package com.ruoyi.fitnesspowers.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fitnesspowers.mapper.FitVideoresourcesMapper;
import com.ruoyi.fitnesspowers.domain.FitVideoresources;
import com.ruoyi.fitnesspowers.service.IFitVideoresourcesService;

/**
 * 视频管理Service业务层处理
 * 
 * @author lzb
 * @date 2023-06-13
 */
@Service
public class FitVideoresourcesServiceImpl implements IFitVideoresourcesService 
{
    @Autowired
    private FitVideoresourcesMapper fitVideoresourcesMapper;

    /**
     * 查询视频管理
     * 
     * @param fitId 视频管理主键
     * @return 视频管理
     */
    @Override
    public FitVideoresources selectFitVideoresourcesByFitId(Long fitId)
    {
        return fitVideoresourcesMapper.selectFitVideoresourcesByFitId(fitId);
    }

    /**
     * 查询视频管理列表
     * 
     * @param fitVideoresources 视频管理
     * @return 视频管理
     */
    @Override
    public List<FitVideoresources> selectFitVideoresourcesList(FitVideoresources fitVideoresources)
    {
        return fitVideoresourcesMapper.selectFitVideoresourcesList(fitVideoresources);
    }

    /**
     * 新增视频管理
     * 
     * @param fitVideoresources 视频管理
     * @return 结果
     */
    @Override
    public int insertFitVideoresources(FitVideoresources fitVideoresources)
    {
        fitVideoresources.setCreateTime(DateUtils.getNowDate());
        return fitVideoresourcesMapper.insertFitVideoresources(fitVideoresources);
    }

    /**
     * 修改视频管理
     * 
     * @param fitVideoresources 视频管理
     * @return 结果
     */
    @Override
    public int updateFitVideoresources(FitVideoresources fitVideoresources)
    {
        fitVideoresources.setUpdateTime(DateUtils.getNowDate());
        return fitVideoresourcesMapper.updateFitVideoresources(fitVideoresources);
    }

    /**
     * 批量删除视频管理
     * 
     * @param fitIds 需要删除的视频管理主键
     * @return 结果
     */
    @Override
    public int deleteFitVideoresourcesByFitIds(Long[] fitIds)
    {
        return fitVideoresourcesMapper.deleteFitVideoresourcesByFitIds(fitIds);
    }

    /**
     * 删除视频管理信息
     * 
     * @param fitId 视频管理主键
     * @return 结果
     */
    @Override
    public int deleteFitVideoresourcesByFitId(Long fitId)
    {
        return fitVideoresourcesMapper.deleteFitVideoresourcesByFitId(fitId);
    }
}
